package test_achieve.web.scenes;

import constant.Constant;
import constant.Pm;
import cucumber.api.PendingException;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import redis.clients.jedis.Jedis;
import test_achieve.web.Merchant;
import test_achieve.web.OrderMain;
import util.tools.BusinessTools;

/**
 * Created by chenkuo on 2017/11/5.
 */
public class Other {
    /**交通方式、代收货款下单封装*/


    /**一取一投，指定交通方式下单*/
    @Given("^w用户下了一个一取一投并要求交通方式的及时单"+ Pm.p12)
    public  void w用户下了一个一取一投并要求交通方式的及时单(String username,String city,String sendAdress,String sendName,String sendMobile,String receiveAddress,String receiveName,String receiveMobile,String weight,String goodsName,String remark,String vehicle) throws Throwable {

        OneToOne oneToOne = new OneToOne();
        oneToOne.w登录并输入一取一投类型订单的详细信息(username, city, sendAdress, sendName, sendMobile, receiveAddress, receiveName, receiveMobile, weight, goodsName, remark);
        Merchant merchant = new Merchant();
        merchant.w指定配送方式交通工具(vehicle);
        OrderMain webmain = new OrderMain();
        webmain.wClickNext();
        webmain. wSubmitOrder();
    }

    @Given("^w用户下了一个一取一投并要求交通方式的及时单"+ Pm.p5)
    public  void w用户下了一个一取一投并要求交通方式的及时单(String username,String city,String sendAdress,String receiveAddressng ,String vehicle) throws Throwable {

        OneToOne oneToOne = new OneToOne();
        oneToOne.w登录并输入一取一投类型订单的详细信息(username, city, sendAdress, null, null, receiveAddressng, null, null, null, null, null);
        Merchant merchant = new Merchant();
        merchant.w指定配送方式交通工具(vehicle);
        OrderMain webmain = new OrderMain();
        webmain.wClickNext();
        webmain. wSubmitOrder();
    }

    @Given("^自动化账户不发短信$")
    public void 自动化账户不发短信() throws Throwable {
        Jedis jedis = BusinessTools.connectRedis();
        jedis.sadd("SmsMsgService.blackSms","13691541162");
        jedis.sadd("SmsMsgService.blackSms","15501213579");
        jedis.sadd("SmsMsgService.blackSms","13691541162");
        jedis.sadd("SmsMsgService.blackSms","15501213579");
        jedis.sadd("SmsMsgService.blackSms","10011111111");
        jedis.sadd("SmsMsgService.blackSms","16611111111");
        jedis.sadd("SmsMsgService.blackSms","16622222222");
        jedis.sadd("SmsMsgService.blackSms","15500000002");
        jedis.sadd("SmsMsgService.blackSms","15501213529");
        jedis.sadd("SmsMsgService.blackSms","15500000003");
        jedis.sadd("SmsMsgService.blackSms","15500000004");
        jedis.sadd("SmsMsgService.blackSms","13816651948");
        jedis.sadd("SmsMsgService.blackSms","17811111111");
        jedis.sadd("SmsMsgService.blackSms","18400000012");
        jedis.sadd("SmsMsgService.blackSms","18400000013");
        jedis.sadd("SmsMsgService.blackSms","13126642902");
        jedis.sadd("SmsMsgService.blackSms","15901019881");
        jedis.sadd("SmsMsgService.blackSms","13120463172");
        jedis.sadd("SmsMsgService.blackSms","18600794229");
        jedis.sadd("SmsMsgService.blackSms","13930281220");
        jedis.sadd("SmsMsgService.blackSms","15075268342");
        jedis.sadd("SmsMsgService.blackSms","17100001111");
        jedis.sadd("SmsMsgService.blackSms","13611111115");
        jedis.sadd("SmsMsgService.blackSms","15722222222");
        jedis.sadd("SmsMsgService.blackSms","15075288618");
        jedis.sadd("SmsMsgService.blackSms","18522222222");
        jedis.sadd("SmsMsgService.blackSms","15801034088");
        jedis.sadd("SmsMsgService.blackSms","18977777777");
        jedis.sadd("SmsMsgService.blackSms","17100002222");
        jedis.sadd("SmsMsgService.blackSms","17100001111");
        jedis.sadd("SmsMsgService.blackSms","17178787878");
        jedis.sadd("SmsMsgService.blackSms","15501213529");
        jedis.sadd("SmsMsgService.blackSms","17145454545");
        jedis.sadd("SmsMsgService.blackSms","17167676767");

    }
}
